package com.andy.buyu.server.game;

public class KeepSeet {

	private int roomId;
	
	private int index;
	
	private Long uid;
	
	private long endTime;
	
	public KeepSeet(int roomId,int index,Long uid,long endTime) {
		this.setRoomId(roomId);
		this.setIndex(index);
		this.uid = uid;
		this.endTime = endTime;
	}
	
	public Long getUid() {
		return uid;
	}
	
	public void setUid(Long uid) {
		this.uid = uid;
	}
	
	public Long getEndTime() {
		return endTime;
	}
	
	public void setEndTime(Long endTime) {
		this.endTime = endTime;
	}

	public boolean isOver() {
		return System.currentTimeMillis()/1000 > endTime;
	}

	public int getLeftTime() {
		return (int) (endTime - (System.currentTimeMillis()/1000));
	}

	public int getRoomId() {
		return roomId;
	}

	public void setRoomId(int roomId) {
		this.roomId = roomId;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}
	
}
